<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>地址联动</title>
<script type="text/javascript" src="/testSSH/res/js/jquery_V1/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/testSSH/res/om-ui/ui/om-core.js"></script>
<script type="text/javascript" src="/testSSH/res/om-ui/ui/om-combo.js"></script>
<script type="text/javascript" src="/testSSH/res/js/Address.js"></script>
<link rel="stylesheet" type="text/css" href="/testSSH/res/om-ui/themes/default/om-all.css" />
<script type="text/javascript">
//"/res/js/jquery_V1/jquery-1.11.1.min.js"
//"/res/js/jquery_V1/jquery.js"
//"/res/js/jquery_V1/jquery.min.js"
//"/res/js/Address.js"
$(document).ready(function() {
	$("#combo_Province").omCombo({
		dataSource : province
		,valueField : "ProID"
		,optionField : "name"
		,onValueChange : function(target, newValue, oldValue, event) {
			var cityList = $.grep(city,function(item){ 
			    return item.ProID==newValue;
			});
			$('#combo_City').omCombo('setData',cityList);
			$('#combo_District').omCombo('setData',null);
			//console.info(cityList);
		}
	});
	$("#combo_Province").omCombo('value','');//防止刷新后文本显示不正常
	
	$("#combo_City").omCombo({
		valueField : "CityID"
		,optionField : "name"
		,onValueChange : function(target, newValue, oldValue, event) {
			var districtList = $.grep(district,function(item){ 
			    return item.CityID==newValue;
			});
			$('#combo_District').omCombo('setData',districtList);
			//console.info(cityList);
		}
	});
	$("#combo_City").omCombo('value','');//防止刷新后文本显示不正常
	
	$("#combo_District").omCombo({
		valueField : "Id"
		,optionField : "DisName"
	});
	$("#combo_District").omCombo('value','');//防止刷新后文本显示不正常
});
</script>
</head>
<body>
<input id="combo_Province" />
<input id="combo_City" />
<input id="combo_District" />
</body>
</html>